package com.cykj.controller;

import com.cykj.dto.ResponseDTO;
import com.cykj.service.IOrderService;
import com.cykj.vo.OrderVO;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Program: Mooc-Admin
 * @Package: com.cykj.controller
 * @Author: 张俊杰
 * @Create: 2025-07-10 13:41
 * @Description: TODO
 * @Vision: 1.0
 **/
@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private IOrderService orderService;

    @Operation(summary = "查看所有订单")
    @GetMapping("list")
    public ResponseDTO getListOrder(OrderVO orderVO) {
        return orderService.getListOrder(orderVO);
    }

    @Operation(summary = "查看订单数量")
    @GetMapping("count")
    public ResponseDTO getOrderCount() {
        return orderService.getOrderCount();
    }
}
